import 'package:flutter/material.dart';
import 'package:flutterapp/widget/list/ListView.dart';
import 'package:flutterapp/widget/list/ListViewseparated.dart';

import 'list/ListBuilder.dart';

class WList extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          centerTitle: true,
          title: Text(
            "列表",
            style: TextStyle(color: Colors.white),
          ),
        ),
        body: Center(
          child: Column(
            children: <Widget>[
              FlatButton(
                child: Text("Listview"),
                color: Colors.indigoAccent,
                textColor: Colors.white,
                onPressed: () {
                  Navigator.push(context, MaterialPageRoute(builder: (context) {
                    return MListView();
                  }));
                },
              ),
              FlatButton(
                child: Text("ListView.builder"),
                color: Colors.indigoAccent,
                textColor: Colors.white,
                onPressed: () {
                  Navigator.push(context, MaterialPageRoute(builder: (context) {
                    return MListBuilder();
                  }));
                },
              ),
              FlatButton(
                child: Text("ListView.separated"),
                color: Colors.indigoAccent,
                textColor: Colors.white,
                onPressed: () {
                  Navigator.push(context, MaterialPageRoute(builder: (context) {
                    return MListViewseparated();
                  }));
                },
              ),
            ],
          ),
        ));
  }
}
